from numpy import array, diag, dot
from numpy.linalg import eig, inv

A = array([[10, 12, 14], [20, 22, 24], [30, 32, 34]])
print(A)

values, vectors = eig(A)
print(values)
print(vectors)

U = vectors
# create inverse of eigenvectors matrix
V = inv(U)
# create diagonal matrix from eigenvalues
S = diag(values)
# reconstruct the original matrix
B = U.dot(S).dot(V)
print(B)
